package bank.client;

import java.io.IOException;
import java.net.UnknownHostException;

import bank.Bank;
import bank.BankDriver;

public class SocketDriver implements BankDriver {
	
	private Bank bank = null;

	public void connect(String[] args) throws NumberFormatException, UnknownHostException, IOException {
		SocketServer communicator = new SocketServer(args[0], Integer.parseInt(args[1]));
		bank = new SocketBank(communicator);

	}

	public void disconnect() throws IOException {
		bank = null;

	}

	public Bank getBank() {
		return bank;
	}

}
